{% extends "smra_portal/portal_template.html" %}
{% block page_id %}publish{% endblock %} 

{% block extrahead %}
<script type="text/javascript" src="/site_media/js/jquery.formset.js"></script>
<script type="text/javascript" src="/site_media/js/jquery.formset.min.js"></script>
<script type="text/javascript">
  $(function() {
    $('div.form-container-class').formset();
  })
</script>
{% endblock extrahead %}

{% load extras %}

{% block main %}

	<div class="page_title">Collection #{{currentvirt.pk}} - {{currentvirt.name}}</div>
	<h3>{{currentvirt.description}}</h3>

<form action="" method="post">
	{% csrf_token %}

	{% for form in publish_forms %}
		{% include form %}
	{% endfor %}
	
	<div class="row_odd"></div>
	
 {{legal|safe}}
 
	<div class="terms_row">
		<input type="checkbox" name="legal" value="Agree">
		<span>
			I agree to the above terms and want to make my data publicly available.
		</span>
		
	</div>

{% endblock main %}


{% block leftbar %}
    <h1>Actions</h1>
    <div class="button_row">
 		<button type ="submit" id="submit" name="update" 
 				value="update">Publish Collection</button>         
    </div>
    
    <h1>Views</h1>
    <div class="button_row">
    	<a href="{% url virtmeta currentvirt.pk %}">Details</a>
	</div>
	
    {% if owner %}
    	<div class="button_row">
    		<a href="{% url virt currentvirt.pk %}">Objects</a>
    	</div>
    {% endif %}

</form>

{% endblock leftbar %}
